export function useDebounce(cb, delay = 400) {
  let timer = null;
  return (...args) => {
    if (timer) {
      clearTimeout(timer);
    }
    timer = setTimeout(() => {
      cb.apply(this, args)
    },delay )
  };
}
